# server_version.py - retrieve and display database server version

import MySQLdb

conn = MySQLdb.connect (host = "localhost",
	 	   user = "akosciak",
		   passwd = "MojaPtaszek",
		   db = "songbump")
cursor = conn.cursor ()
cursor.execute ("SELECT * FROM Edges")
result_set = cursor.fetchall ()
for row in result_set:
	print "%s, %s" % (row["Id"], row["weight"])
print "Number of rows returned: %d" % cursor.rowcount
cursor.close ()
conn.close ()
